﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XBLIGUK2011Talk2.PostProcessing
{
    //Crepuscular Rays code adapted from RandomChaos2DGodRays code
    public class CrepuscularRaysEffect : BasePostProcessingEffect
    {
        LightSourceMask lsm;
        LightSceneMask lssm;
        LightRays lr;

        public Vector3 Position
        {
            get { return lsm.Position; } //get any of the positions here
            set 
            { //setting position value in ALL effects used
                lsm.Position = value;
                lssm.Position = value;
                lr.Position = value;
            }
        }

        public CrepuscularRaysEffect(Game game, Vector3 position) : base(game)
        {
            lsm = new LightSourceMask(game, position);
            lssm = new LightSceneMask(game, position);
            lr = new LightRays(game, position);

            AddPostProcess(lsm);
            AddPostProcess(lssm);
            AddPostProcess(lr);

        }
    }
}
